<template>
  <div class="account">
    <el-container>
      <el-header>
        <el-breadcrumb>
          <el-breadcrumb-item>基础信息维护</el-breadcrumb-item>
          <el-breadcrumb-item>商品分类维护</el-breadcrumb-item>
          <el-breadcrumb-item>查看</el-breadcrumb-item>
        </el-breadcrumb>
      </el-header>
      <el-main>
        <div class="main-content">
          <el-tree 
          :data="data" 
          :props="defaultProps" 
          :default-expand-all="true"
          @node-click="handleNodeClick">
        </el-tree>
        </div>
      </el-main>
      <el-footer>
        <div class="footer">
          <el-button type="primary">返回商品分类维护</el-button>
        </div>
      </el-footer>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: [
        {
          label: "酒店会所",
          children: [
            {
              label: "星级酒店"
            },
            {
              label: "度假酒店"
            },
            {
              label: "经济酒店"
            }
          ]
        }
      ],
      defaultProps: {
        children: "children",
        label: "label"
      }
    };
  },
  methods: {
    handleNodeClick(data) {
      console.log(data);
    }
  }
};
</script>

<style scoped>
.account .el-header {
  height: 60px;
  border-bottom: 1px solid #f3f3f3;
}
.el-breadcrumb {
  height: 60px;
  line-height: 60px;
}
.main-header {
  text-align: center;
  align-items: center;
  display: flex;
}
.main-header >>> .el-input {
  width: 200px;
  margin-right: 20px;
}
.main-content {
  margin: 40px;
}
.el-footer {
  margin: 0 auto;
}
</style>